<template>
    <div class="search-input-component">
    	<h3 class="result-label">查询结果</h3>
        <div>
        	<Table :loading="loading" :columns="columns1" :data="data1"></Table>
        </div>
    </div>
</template>

<script>
    export default {

        data () {
            return {
                loading: false,
                columns1: [
                    {
                        title: '优惠ID',
                        key  : 'id'
                    },{
                        title: '标题',
                        key  : 'time'
                    },{
                        title: '优惠类型',
                        key: 'status'
                    },{
                        title: '优惠内容',
                        key: 'creator'
                    },{
                        title: '业务',
                        key: 'name'
                    },{
                        title: '用户',
                        key: 'name'
                    },{
                        title: '渠道',
                        key: 'name'
                    },{
                        title: '创建人',
                        key: 'name'
                    },{
                        title: '操作',
                        key: 'action',
                        fixed: 'right',
                        width: 220,
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'large',
                                        disabled:true
                                    }
                                }, '查看'),

                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'large',
                                    }
                                }, '编辑'),

                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'large',
                                    }
                                }, '复用')
                            ]);
                        }
                    }
                ],
                data1: [
                    {
                        id: '王小明',
                        time: 18,
                        status: '北京市朝阳区芍药居',
                        creator: '北京市朝阳区芍药居',
                        name: '北京市朝阳区芍药居'
                    },{
                        id: '王小明',
                        time: 18,
                        status: '北京市朝阳区芍药居',
                        creator: '北京市朝阳区芍药居',
                        name: '北京市朝阳区芍药居'
                    }
                    
                ]
            }
        }
    }
</script>

<style scoped>

  .search-input-component{
  	margin:15px 0;
  }

  .result-label{
  	margin-bottom: 10px;
  }
</style>
